<?php

	namespace Phptricks\app\controllers\error;

	use Phptricks\app\controllers\base\base as base;

	class error extends base{
		public function __construct(){
			parent::__construct();
		}

		/**
		 * 
		 * @param type $type error type
		 * @param type $pagename class name
		 * @return String Display Error page
		 */
		public function index($type = '404', $pagename = ''){
			switch ($type) {
				case '404':
					$error_data = $this->lang['error_404'] . " : " . $this->settings['site_url'] . $pagename;
					$this->view->assign('errors', $error_data);
					$this->view->display('error.tpl');
					break;
			}
			return true;
		}

	}
	